<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>simRMLMoveToPosition</title>
<link rel="stylesheet" type="text/css" href="../../style.css">
</head>

<body>

<div align="center">
<table class=allEncompassingTable >
 <tr>
  <td >
<p><a href="../../index.html" TARGET="_top"><img src="../images/homeImg.png"></a></p>

<h1>Regular API function</h1>
<h3 class=subsectionBar><a name="simRMLMoveToPosition" id="simRMLMoveToPosition"></a>simRMLMoveToPosition / sim.rmlMoveToPosition 
</h3>
<table class=apiTable>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>DEPRECATED. See <a href="simMoveToPose.htm">sim.moveToPose</a> instead.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCSyn>
C synopsis
</td> 
<td class=apiTableRightCSyn><div></div></td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCParam>C parameters</td> 
<td class=apiTableRightCParam><div></div></td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCRet>
C return value
</td> 
<td class=apiTableRightCRet>
<div></div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>int result,table[3] newPos,table[4] newQuaternion,table[4] newVel,table[4] newAccel,float timeLeft=sim.rmlMoveToPosition(int objectHandle,int relativeToObjectHandle,int flags,table[4] currentVel,table[4] currentAccel,table[4] maxVel,table[4] maxAccel,table[4] maxJerk,table[3] targetPosition,table[4] targetQuaternion,table[4] targetVel)

</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>objectHandle</strong>: handle of the object to be moved</div>
<div><strong>relativeToObjectHandle</strong>: indicates relative to which reference frame the movement data is specified. Specify -1 for a movement relative to the absolute reference   frame, sim.handle_parent for a movement relative to the object's parent   frame, or an object handle relative to whose reference frame the   movement should be performed.</div>
<div><strong>flags</strong>: <a href="../apiConstants.htm#RMLFunctions">RML flags</a>. -1 for default flags.</div>
<div><strong>currentVel</strong>: the current velocity of the object (velX, velY, velZ, velAngle). Can be nil in which case a velocity vector of 0 is used.</div>
<div><strong>currentAccel</strong>: the current acceleration of the object (accelX, accelY, accelZ, accelAngle). Can be nil in which case an acceleration vector of 0 is used.</div>
<div><strong>maxVel</strong>: the maximum allowed velocity  of the object (maxVelX, maxVelY, maxVelZ, maxVelAngle)</div>
<div><strong>maxAccel</strong>: the maximum allowed acceleration  of the object (maxAccelX, maxAccelY, maxAccelZ, maxAccelAngle)</div>
<div><strong>maxJerk</strong>: the maximum allowed jerk  of the object (maxJerkX, maxJerkY, maxJerkZ, maxJerkAngle). With the RML type II plugin, the max. jerk will however always be infinite.</div>
<div><strong>targetPosition</strong>: the desired target position of the object (expressed relative to <em>relativeToObjectHandle</em>). Can be nil, in which case the position of the object will stay constant</div>
<div><strong>targetQuaternion</strong>: the desired target orientation of the object (expressed relative to <em>relativeToObjectHandle</em>). Can be nil, in which case the orientation of the object will stay constant</div>
<div><strong>targetVel</strong>: the desired velocity of the object at the target (targetVelX, targetVelY, targetVelZ, targetVelAngle). Can be nil in which case a velocity vector of 0 is used.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div><strong>result</strong>: 1 if the function call was successful</div>
<div><strong>newPos</strong>: the new relative position of the object</div>
<div><strong>newQuaternion</strong>: the new relative orientation of the object</div>
<div><strong>newVel</strong>: the new velocity vector (velX, velY, velZ, velAngle)</div>
<div><strong>newAccel</strong>: the new acceleration vector (accelX, accelY, accelZ, accelAngle)</div>
<div><strong>timeLeft</strong>: the time left for additional calculations in current simulation time step</div>
</td> 
</tr> 
</table> 


<br>
</td>
</tr>
</table>
</div>
</body>
</html>
